1. Field of the Invention
The present invention relates to dealing with order information provided from a user to a service provider in the case where printing is ordered in a digital photograph service. More specifically, the present invention relates to a method, an apparatus, and a program for verifying whether or not the order information is in a file acceptable by a system of the service provider, by comparing the structure and the content of the order information with a pre-stored definition.
2. Description of the Related Art
Recently, a digital photograph service which stores and uses a photograph image as digital data has come into service. In a digital photograph service, photographs recorded on a film of a user are recorded as digital data in a recording medium such as a CD-R, or stored in a hard disc of a service provider""s system in order to be used for photographic print generation or the like.
A user can place a printing order regarding the stored image data from the service provider by providing order information describing the content of the order via a network or a recording medium. In this case, the system of the service provider obtains this information, analyzes its content, and carries out the printing processing requested by the user.
The order information is generated by a dedicated program installed in a personal computer or the like of the user. Alternatively, the order information may be generated by using an electronic camera, a home game machine, or the like loaded with such a program. This program displays on a screen a list of image data available for printing, or a list of service options (such as print sizes and templates for editing). When the user selects, based on the display, desired image data and a service option by using a mouse, a keyboard, or a button, the program inputs such information and generates a file including order information describing IDs for the selected image data and the service option in a predetermined format.
In such a form of order placement, when the structure of order information is invalid or when the order information has a grammatical error, the system of the service provider cannot carry out the processing requested by the user. Even when there is no grammatical error in the format, it is actually impossible for the system to carry out the requested processing if the content of the order is inappropriate, such as the case of specification of a print size which is too large to be processed by the existing system.
Therefore, a program such as the above needs to prevent generation of invalid order information by verifying the structure and the content of the order information generated by the user. Alternatively, separately from such an order information generating program, an order information verification program needs to be provided so that whether or not the order information generated by the order information generating program is in the form of an appropriate file can be checked.
A program (verifier) for verifying the structure and the content of a file generally retains information defining an appropriate structure and the content of a file. By comparing a file with this definition, the file is judged to be valid or invalid. Therefore, whether the order information is valid or invalid can be judged by comparing the order information with pre-stored information such as the structure and grammar (a description format) of a file including the order information, the available print sizes, and the like.
However, the content of a digital photograph service changes with progress of technology or the needs of users. Therefore, the structure of order information can be changed in accordance with a change in the service.
Furthermore, the content of the service to be provided usually varies depending on each service provider, such as a DPE or a laboratory. Moreover, the content of the service to be provided may change depending on the time of year. For example, the available print sizes change depending on a printer owned by a service provider, and there are some services which are provided in only a limited period, such as generation of new year greeting postcards or the like.
Therefore, the above form of service wherein the order information generating or verifying program retains information regarding definitions of the structure of the order information and the content of an order cannot carry out proper verification unless each service provider uses a different program in each service period of a year.
However, generating and replacing programs is a burden for both a service provider and a user. Based on consideration of the above problems, the present invention aims to provide an easier order information verifying method and apparatus as well as a program which verifies order information.
In order to solve the above problems, the present invention manages definition information defining conditions to be satisfied by order information as an individual replaceable file.
In other words, the order information verifying method of the present invention verifies order information describing the content of an order for a predetermined service as digital data, and comprises the steps of:
pre-storing, as digital data in a predetermined recording medium, one or a plurality of condition definition files describing conditions to be satisfied by order information;
obtaining order information to be verified;
reading at least one of the condition definition files from the recording medium;
verifying whether or not the obtained order information satisfies each condition described in the condition definition file having been read; and
outputting a result of verification to a display medium and/or a recording medium.
The xe2x80x9corder informationxe2x80x9d may be a text file describing only the content of an order, or an independent file of another form. The order information may also be attached to an image file (embedded as a portion of header information of the image file), for example.
The xe2x80x9cconditions to be satisfied by the order informationxe2x80x9d means structural conditions to be satisfied by an order file containing the order information therein (or an image file having order information embedded therein), for example. The structural conditions means whether or not a file has an appropriate file-name extension and file header, for example. When a file has a hierarchy structure comprising a plurality of storages and streams, such as an OLE structure, whether or not the file has a necessary storage or stream is also regarded as a structural condition.
Furthermore, the xe2x80x9cconditions to be satisfied by the order informationxe2x80x9d includes conditions to be satisfied by each data item composing the order information, and conditions regarding a relation between the data items, for example.
The xe2x80x9cconditions to be satisfied by each data item composing the order informationxe2x80x9d means a data type of each item, for example.
The xe2x80x9cconditions regarding a relation between the data itemsxe2x80x9d mean a condition such that a value describing the number of prints needs to be described in a data item specifying the quantity when a value indicating a printing service is described in a data item specifying the kind of service (that is, when printing is ordered, the quantity of prints needs to be specified), for example.
When a plurality of condition definition files are recorded in a recording medium, a condition definition file having a condition contradictory to that in another file may be recorded so that the condition definition files can be used properly depending on a purpose. Alternatively, condition definition files classified by the kind of conditions, such as a condition definition file defining a file structure and a condition definition file defining data items, may be provided so that verification is carried out by referring to those condition definition files.
Furthermore, when the content of the predetermined service is decided by the time of year, a condition definition file for each service period may be recorded in the recording medium and the verification is carried out by reading from the recording medium the condition definition file corresponding to the time at which an order is placed.
Likewise, when the content of the predetermined service is decided by each service provider, a condition definition file for each service provider may be recorded in the recording medium so that the verification can be carried out by reading from the recording medium the condition definition file for the service provider which receives the order information.
The result of the verification may be shown as a mere judgment result such as xe2x80x9cvalidxe2x80x9d or xe2x80x9cinvalidxe2x80x9d. However, information indicating whether or not each condition has been satisfied may be output for each condition, such as xe2x80x9cthe file structure is valid, the print size is invalidxe2x80x9d. Furthermore, for a condition which has not been satisfied, information indicating violation of the condition, such as xe2x80x9ca print size is not specified in the printing orderxe2x80x9d, may be output as well.
The verification result may be displayed on a display medium such as a monitor or the like belonging to a system, or output on paper by a printer. Alternatively, the result may be output to both the monitor and the paper.
The order information verifying method of the present invention has been explained in the above. An order information verifying apparatus of the present invention thus verifies order information according to the above method.
In other words, the order information verifying apparatus verifies order information describing the content of an order for a predetermined service as digital data, and comprises:
a recording medium for storing one or a plurality of condition definition files describing, as digital data, conditions to be satisfied by order information;
order information obtaining means for obtaining order information to be verified;
condition reading means for reading from the recording medium at least one of the condition definition files;
verifying means for verifying whether or not the obtained order information satisfies each condition described in the condition definition file having been read; and
result outputting means for outputting a result of verification to a display medium and/or a recording medium.
More specifically, the order information verifying apparatus of the present invention can be realized as an apparatus dedicated for the verification or as an apparatus comprising functions for generating and verifying order information, and may be installed at a counter of a service provider. Alternatively, if the order information verifying apparatus is realized as a digital camera comprising the order information generating and verifying functions, a user can carry out the verification.
As has been described above, the condition definition file describes conditions for a file structure, each data item of order information, and a relationship between the data items, for example.
In the case where a condition definition file for each service period is generated, the condition reading means judges the time of order placement by using the date of generation or reception of the order information, and the condition definition file for the service period corresponding to the time is read from the recording medium.
Likewise, in the case where a condition definition file for each service provider is generated, the condition reading means reads from the recording medium the condition definition file for the service provider which receives the order information. The xe2x80x9cservice provider which receives the order informationxe2x80x9d means the service provider specified at the time of order information generation in the case where the order information verifying apparatus is installed on the user side, while it means the service provider having the order information verifying apparatus in the case where the order information verifying apparatus is installed on the service provider side.
It is preferable for the result outputting means to output information indicating whether or not each condition has been met, and also information showing each violation of a condition which has not been satisfied.
A program recorded in a recording medium of the present invention carries out verification processing according to the above verification method.
In other words, the program verifies order information describing as digital data the content of an order for a predetermined service, and causes a computer to execute order information obtaining processing wherein order information to be verified is obtained;
condition reading processing wherein at least one condition definition file is read from a recording medium storing one or a plurality of condition definition files describing, as digital data, conditions to be satisfied by order information;
verification processing wherein whether or not each condition described in the condition definition file is satisfied by the order information having been obtained is verified; and
result output processing wherein a result of verification is output to a display medium and/or a recording medium.
As has been described above, the condition definition file is assumed to have conditions for a file structure, each data item composing order information, and a relationship between the data items, for example.
In the case where a condition definition file for each service period is generated, the time of order placement is judged in the condition reading processing by using the date of generation or reception of the order information, and the condition definition file for the service period corresponding to the time is read from the recording medium.
Likewise, in the case where a condition definition file for each service provider is generated, the condition definition file for the service provider which receives the order information is read from the recording medium in the condition reading processing.
It is preferable for information indicating whether or not each condition has been met and information showing each violation of the condition which is described in the condition definition file and has not been satisfied to be output in the result output processing.
The order information verifying method and apparatus of the present invention, and the program recorded in the recording medium retain conditions to be satisfied by order information not as fixed information but in a file which can be dealt with independently, and refers to the file in the verification processing. According to the present invention, by managing conditions to be satisfied by order information (a file structure, a data type, for example) in the form of a file, the definition information can be replaced more easily and a flexible response is possible when a format of the order information or the content of a service changes.
Furthermore, by providing a condition definition file for each service period or service provider, the case where a different service is provided depending on the time or a service provider can be dealt with.
Moreover, upon outputting the verification result, if whether or not each condition is met is indicated and a list of violations is provided, it is easier for a user or an operator to change the order information when the order information has been found to be invalid.